import request from '@/utils/request'

const api = {
  list: '/system/versions/getVersionsList',
  update: '/system/versions/updateVersions',
  add: '/system/versions/addVersions',
  isExist: '/system/versions/addVersionsIsExist',
  del: '/system/versions/delVersions',
}

export function getVersionsList (params) {
  return request({
    url: api.list,
    method: 'POST',
    data: params
  })
}

export function addVersion(params) {
  return request({
    url: api.add,
    method: 'POST',
    data: params
  })
}

export function isExistVersion(params) {
  return request({
    url: api.isExist,
    method: 'POST',
    data: params
  })
}

export function delVersions(params) {
  return request({
    url: api.del,
    method: 'POST',
    data: params
  })
}

export function updateVersions(params) {
  return request({
    url: api.update,
    method: 'POST',
    data: params
  })
}